<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./lib/themes/metro/easyui.css" />
    <link rel="stylesheet" href="./lib/themes/icon.css" />
</head>
<body>
    <div id="app" >
        <ko-datagrid id="datagrid" ></ko-datagrid>
        <button type="button" data-bind="click:add" >select</button>
    </div>
    <script src="./lib/jquery.min.js"></script>
    <script src="./lib/jquery.easyui.min.js"></script>
    <script src="./lib/locale/easyui-lang-zh_CN.js"></script>
    <script src="./lib/knockout-3.5.0.js" ></script>
    <script src="/koeasyui.js"></script>
    <script>
        koeasyui.use(window.ko);  
        var rootVm={ 
            add:function(){  
                var $datagrid = koeasyui.getContextFor(document.getElementById('datagrid'));
                $datagrid.select(1);
            }
        };
        ko.applyBindings(rootVm, document.getElementById('app'));
    </script>
</body>
</html>